package day3.Exer;

import java.util.Scanner;

public class Clactest {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        Clac a = new Clac();
        a.brand = "卡西欧";
        a.color = "黑色";
        a.price = 12.5;
        a.showinfo();
        String answer = in.next();
        while (answer.equals("y")) {
            System.out.println("请输入第一个数：");
            double i = in.nextDouble();
            System.out.println("请输入第二个数：");
            double j = in.nextDouble();
            System.out.println("两个数的和：");
            a.add(i,j);
            System.out.println("两个数的差：");
            a.sub(i,j);
            System.out.println("两个数的积：");
            a.mult(i, j);
            System.out.println("两个数的商：");
            a.div(i,j);
            System.out.println(i+"的"+(int)j+"次幂：");
            a.power(i,(int)j);
            System.out.println("是否继续使用");
            answer=in.next();
        }
    }
}
